#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

void *frist_thread_func(void *args)
{
    printf("This is the first thread,id:%d\n",gettid());
}

void *second_thread_func(void *args)
{
    printf("This is the second thread,id:%d\n",gettid());
}

int main(void)
{
    printf("main id:(%d)\n",gettid());
    pthread_t pth1, pth2;
    pthread_create(&pth1, NULL, frist_thread_func, NULL);
    pthread_create(&pth2, NULL, second_thread_func, NULL);
    printf("pth1:%ld\n",pth1);
    printf("pth2:%ld\n",pth2);
    pthread_join(pth1, NULL);
    pthread_join(pth2, NULL);
    return 0;
}